package cn.openea.perpartner.meily.web.mapper;

import cn.openea.perpartner.meily.web.entity.GroupBuying;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author rains
 * @since 2023-02-19 10:24
 */
@Repository
public interface SettlementIncomeMapper extends BaseMapper<GroupBuying> {

    @Select("select * from meily_group_buying where `status` = '1' and id in (select main_docunid from meily_group_buying_sub ${ew.customSqlSegment})")
    List<GroupBuying> getlist(@Param("ew") QueryWrapper<GroupBuying> wrapper);
}
